package com.ec.core.annotation;

/**
 * <p>Title: ec</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008 7</p>
 *
 * <p>Company: ec</p>
 *
 * @author pgf
 * @version 1.0
 */
import java.util.*;
import java.lang.reflect.*;
import java.lang.annotation.*;
import com.ec.core.annotation.*;

public class AnnotationTest {
    public AnnotationTest() throws ClassNotFoundException {

//        Class currentClass = com.ec.bean.Directory.class;
//        System.out.println(currentClass.getName());
//        AnnotatedElement target = com.ec.bean.Directory.class;
//        Annotation[] anno = target.getDeclaredAnnotations();
//        System.out.println(anno.length);
//        for(int i=0;i<anno.length;i++){
//            if(anno[i] instanceof Table){
//                Table table = (Table)anno[i];
//                System.out.println(table.name());
//            }
//        }
//       Method[] methods = currentClass.getDeclaredMethods();
//       for(Method method:methods){
//           Annotation[] methodAnno = method.getDeclaredAnnotations();
//           for(Annotation mAnno:methodAnno){
//               System.out.println(method.getName() + " : "
//                       + mAnno.annotationType().getName());
//               if(mAnno instanceof Field){
//                   Field field = (Field)mAnno;
//                   System.out.println(method.getName()+":"+field.name());
//               }
//
//           }
//       }
    }

    public static void main(String[] args) throws ClassNotFoundException {
        AnnotationTest annotationtest = new AnnotationTest();
    }
}
